/**
 * Copyright (c) 2018 兴道科技 All rights reserved.
 * https://xingdao.com
 * 版权所有，侵权必究！
 */

package com.slf;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;


/**
 * xdf-admin
 *
 * @author C同学 zaiculture@sina.com
 */
@SpringBootApplication(scanBasePackages = {"com.slf"})
public class SLFApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(SLFApplication.class, args);
	}
//	@Override
//	public void onStartup(ServletContext servletContext) throws ServletException {
//		//设置文本缓存1M
//		servletContext.setInitParameter("org.apache.tomcat.websocket.textBufferSize", Integer.toString((1024 * 1024)));
//	}
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(SLFApplication.class);
	}

}